/**
 * Copyright (C), 2018 store
 * Encoding: UTF-8
 * Date: 19-4-24 上午11:35
 * History:
 */
package com.swak.frame.api.filter.spi;

import org.joda.time.DateTime;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.swak.frame.chain.FilterInvoker;
import com.swak.frame.context.BoundContext;
import com.swak.frame.filter.ApiFilter;


/**
 * ParamValidateFilter.java 参数封装获取
 *
 * @author ColleyMa
 * @version 19-4-24 上午11:35
*/
public class ParamValidateFilter implements ApiFilter {
	private Logger logger = LoggerFactory.getLogger(this.getClass());
    

	@Override
	public void doFilter(BoundContext context, FilterInvoker<BoundContext> nextFilter) {
		logger.info("start doFilter:{}", DateTime.now().toString());
	    context.setToken(context.getRequest().getChannelToken());
		//下一个流程
		nextFilter.invoke(context);
	}
}
